<head>
{literal}  
<script type="text/javascript">
function deletechecked()
{
	var answer = confirm("Delete Selected Recored ?")
	if (answer)
	{
	  document.messages.submit();
	}
	return false;
} 
</script>
{/literal}
</head>
<form name="subCategoryAdd" action="{$smarty.server.PHP_SELF}" id="subCategoryAdd" method="post">
<input type="hidden" name="subCategoryId" value="{$subCategoryId}" />  
<table align="center" border="1" cellpadding="2" cellspacing="1" >
<tr>
  <td align="center" class="table1" colspan="2">Sub-Category Entry</td>
</tr>
<tr>
  <td align="right" class="table2">Category :</td>
  <td align="left" class="table2">
    <select name="categoryIdPopup" id="categoryIdPopup" class="classForParty">
      {html_options values=$categoryIdArr output=$categoryNameArr selected=$categorySelected}
    </select>
  </td>
</tr>
<tr>
  <td align="right" class="table2">Sub Category Name : </td>
  <td class="table2"><input type="text" name="subCategoryName" id="subCategoryName" value="{$subCategoryName}" autofocus="autofocus"></td>
</tr>
  <tr>
    <td align="center" class="table2" colspan="2"><input type="submit" name="insertBtn" value="Submit" class="insertBtn" /></td>
  </tr>
</table>
</form> 

<form action="{$smarty.server.PHP_SELF}" name='category' method='POST'>
<table border='0' cellpadding='1' cellspacing='2' align='center'>
<tr>
  <td class="table1" align="center" colspan="4"><font style="font-size: 16px"><b>! Sub-Category Available !</b></font></td>
</tr>
<tr>
  <td  class="table1" align='center' ><B>&nbsp;</td>
  <td  class="table1" align='center' ><B>&nbsp;</td>
	<td  class="table1" align='center' ><B>Category Name</td>
  <td  class="table1" align='center' ><B>Sub-Category Name</td>	  
</tr>
{section name="sec" loop=$subCategoryDetailArray}
<tr>
  <td class="table2" align="center">
    <a href="subCategoryAdd.php?subCategoryId={$subCategoryDetailArray[sec].subCategoryId}" class="link"><img src="./images/b_edit.png" border="0" width="15" height="15"></a>
  </td>
  <td class="table2" align="center">  
  	<a href="subCategoryDelete.php?subCategoryId={$subCategoryDetailArray[sec].subCategoryId}" class="link" onclick="return confirm('Are You Sure?');"><img src="./images/deleteIcon.png" border="0" width="15" height="15"></a>
  </td>
  <td class="table2" align="left"> {$subCategoryDetailArray[sec].categoryName}</td>
  <td class="table2" align="left"> {$subCategoryDetailArray[sec].subCategoryName}</td>
</tr>
{/section}
</table>
</form>
